<%--
  Created by IntelliJ IDEA.
  User: Teacher
  Date: 2023/11/22
  Time: 14:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Title</title>
    <link rel="stylesheet" href="<%= request.getContextPath() %>/assets/bootstrap/css/bootstrap.min.css">
    <style>
        html,body{
            height: 100%;
        }
        body{
            display: flex;
            flex-direction: column;
        }
        .content{
            flex-grow: 1;
            margin: 0px;
        }
        .left-nav{
            padding: 0px;
        }
    </style>
    <script src="<%= request.getContextPath() %>/assets/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
    <nav class="navbar bg-primary-subtle" data-bs-theme="dark">
        <div class="container-fluid">
            <a class="navbar-brand" href="#">UMS</a>
        </div>
    </nav>
    <div class="row content">
        <div class="col bg-secondary-subtle left-nav">
            <div class="list-group">
                <a href="#" class="list-group-item list-group-item-action">
                    The current link item
                </a>
                <a href="#" class="list-group-item list-group-item-action">A second link item</a>
                <a href="#" class="list-group-item list-group-item-action">A third link item</a>
                <a href="#" class="list-group-item list-group-item-action">A fourth link item</a>
                <a class="list-group-item list-group-item-action disabled">A disabled link item</a>
            </div>
        </div>
        <div class="col-10">
            <% String path = "home/"+(String) request.getAttribute("path"); %>
            <%= path %>
<%--通过指令或者动作载入其它jsp页面--%>
<%--  指令模式 ：静态导入 - 不能使用动态变量的 --%>
<%--            <%@include file="home/users.jsp"%>--%>
<%--            <%@include file="home/addUser.jsp"%>--%>
<%--            下述导入报错-不支持动态变量--%>
<%--            <%@include file="home/<%= path %>"%>--%>
<%--  动作模式 ：动态java代码导入(方法的调用) - 使用动态变量--%>
            <jsp:include page="<%= path %>" ></jsp:include>
        </div>
    </div>
</body>
</html>
